﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using TMPro;
using UnityEngine;

namespace Assets.Scenes.Script.UI
{
    class ParmInputBox:MonoBehaviour
    {
        public TextMeshProUGUI textName;
        public TextMeshProUGUI input;
        private int index;
        private ConfigItem configItem;

        public void Init(ConfigItem configItem,int index)
        {
            this.configItem = configItem;
            this.index = index;
            textName.text = configItem.psName[index];
        }

        public void OnValueChange()
        {
            Debug.Log(input.text);
            configItem.psValue[index] = input.text.Trim();
            UIManager.Single.output.text = configItem.CMD;
        }
    }
}
